package com.hyzh.latte.sand;

import com.corundumstudio.socketio.SocketIOClient;
import com.hyzh.latte.sand.socket.SandEventType;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

/**
 * @author songkui
 * @since 2024/3/21 9:36
 */
@Getter
@Setter
@NoArgsConstructor
@EqualsAndHashCode(of = {"sessionId"})
@Slf4j
public class SandClient {

    private SocketIOClient client;
    private String sessionId;
    private String parkCode;
    private String userId;
    private SandClientTypeEnum typeEnum; //

    public void sendMTMessage(String json) {
        client.sendEvent(SandEventType.MT_RELAY_TYPE.event(), json);
    }

    public void sendPCMessage(String json) {
        client.sendEvent(SandEventType.PC_RELAY_TYPE.event(), json);
    }



}
